package com.lei.yohuo001java.bean;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Keep;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Unique;
import org.greenrobot.greendao.annotation.Generated;

/**
 * @ProjectName : YoHuo001Java
 * @Author : 雷金泷
 * @Time : 2020/12/24 18:56
 * @Description : 文件描述
 */
@Entity(nameInDb = "GOODENTIY")
public class GoodsEntiy {
    @Id(autoincrement = true)
    @Unique
    private Long id;
    @Property(nameInDb = "picturl")
    private String picturl;
    @Property(nameInDb = "title")
    private String title;
    @Property(nameInDb = "price")
    private double price;
    @Property(nameInDb = "select_num")
    private int select_num = 0;
    private boolean select;

    @Override
    public String toString() {
        return "GoodsEntiy{" +
                "id=" + id +
                ", picturl='" + picturl + '\'' +
                ", title='" + title + '\'' +
                ", price='" + price + '\'' +
                ", select_num='" + select_num + '\'' +
                ", select=" + select +
                '}';
    }

    @Keep
    public GoodsEntiy(Long id, String picturl, String title, double price,
                      int select_num, boolean select) {
        this.id = id;
        this.picturl = picturl;
        this.title = title;
        this.price = price;
        this.select_num = select_num;
        this.select = select;
    }
    @Generated(hash = 290858703)
    public GoodsEntiy() {
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getPicturl() {
        return this.picturl;
    }
    public void setPicturl(String picturl) {
        this.picturl = picturl;
    }
    public String getTitle() {
        return this.title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    public double getPrice() {
        return this.price;
    }
    public void setPrice(double price) {
        this.price = price;
    }
    public int getSelect_num() {
        return this.select_num;
    }
    public void setSelect_num(int select_num) {
        this.select_num = select_num;
    }
    public boolean getSelect() {
        return this.select;
    }
    public void setSelect(boolean select) {
        this.select = select;
    }
}
